<%--
  Created by IntelliJ IDEA.
  User: ssk
  Date: 18-12-9
  Time: 下午6:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="<c:url value="resources/style.css"/> ">
    <style type="text/css">
        span.error{
            color: red;
        }
        div.error{
            background-color: #ffcccc;
            border: 2px solid red;
        }
        label.error{
            color: red;
        }
        input.error{
            background-color: #ffcccc;
        }
    </style>
</head>
<body>
<h1>Register</h1>
<sf:form method="post" commandName="spitter">
    <sf:errors path="*" element="div" cssClass="error"/>
    <sf:label path="firstName" cssErrorClass="error">First Name</sf:label>: <sf:input path="firstName" cssErrorClass="error"/><sf:errors path="firstName"  cssClass="error"/><br/>
    <sf:label path="lastName" cssErrorClass="error">Last Name</sf:label> : <sf:input path="lastName" cssErrorClass="error"/><sf:errors path="lastName"  cssClass="error"/><br/>
    <sf:label path="username" cssErrorClass="error">Username</sf:label> :  <sf:input path="username" cssErrorClass="error"/><sf:errors path="username"  cssClass="error"/><br/>
    <sf:label path="password" cssErrorClass="error">Password</sf:label> :  <sf:password path="password" cssErrorClass="error"/><sf:errors path="password"  cssClass="error"/><br/>
    <input type="submit" value="Register">
</sf:form>
</body>
</html>
